var a = getApp();

Page({
    data: {
        wechat_openid: a.globalData.wechat_openid,
        my_mingpan: {},
        birthday: {},
        sex: getApp().globalData.userHistory || 0,
        info_8: [],
        yearList: []
    },
    onLoad: function() {
        var e = this, n = {
            wechat_openid: a.globalData.wechat_openid
        };
        wx.request({
            url: "https://api.xiongmaomingli.com/api/index/my_mingpan",
            data: n,
            method: "POST",
            success: function(a) {
                200 == a.statusCode && 200 == a.data.code && (console.log(a), e.setData({
                    my_mingpan: a.data.result
                }));
            }
        });
        var t = {
            sex: 1,
            birthday: {
                cYear: 2017,
                cMonth: 7,
                cDay: 7,
                cTime: 17,
                lYear: 2017,
                lMonth: 7,
                lDay: 14,
                gzT: [ "酉时", "酉时" ]
            },
            info_8: [ {
                name: "年",
                value: [ "财", "丙", "寅", "庚壬", "庚壬" ]
            }, {
                name: "月",
                value: [ "比肩", "丙", "寅", "庚", "印" ]
            }, {
                name: "日",
                value: [ "日主", "壬", "寅", "庚壬戊", "财杀食" ]
            }, {
                name: "时",
                value: [ "枭", "丙", "寅", "庚壬戊", "财杀食" ]
            } ],
            yearList: [ {
                name: "丁酉",
                year: 2011,
                flag: !1
            }, {
                name: "戊戌",
                year: 2011,
                flag: !1
            }, {
                name: "戊戌",
                year: 2021,
                flag: !1
            }, {
                name: "戊戌",
                year: 2031,
                flag: !1
            }, {
                name: "丁酉",
                year: 2041,
                flag: !1
            }, {
                name: "戊戌",
                year: 2051,
                flag: !0
            }, {
                name: "丁酉",
                year: 2061,
                flag: !1
            }, {
                name: "戊戌",
                year: 2071,
                flag: !1
            } ]
        };
        this.setData({
            birthday: t.birthday,
            sex: t.sex,
            info_8: t.info_8,
            yearList: t.yearList
        });
    },
    onShareAppMessage: function(a) {
        return "button" === a.from && console.log(a.target), {
            path: "/pages/index/index",
            success: function(a) {
                console.log(a);
            },
            fail: function(a) {
                console.log(a);
            }
        };
    }
});